@import url('./variable.less');
@import url('./reset.less');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font: bold 20px 'Courier';
}

// 游戏容器
#main {
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: space-around;
  width: 360px;
  height: 420px;
  background-color: @bg-color;
  margin: 100px auto;
  border: 10px solid black;
  border-radius: 40px;
  // 游戏舞台
  #stage {
    width: 304px;
    height: 304px;
    border: 2px solid black;
    // 开启相对定位
    position: relative;

    #snake > div {
      width: 10px;
      height: 10px;
      background-color: #000;
      border: 1px solid @bg-color;
      // 开启绝对定位
      position: absolute;
    }

    & > #food {
      width: 10px;
      height: 10px;
      // border: 1px solid @bg-color;
      // 开启相对定位
      position: absolute;
      left: 10px;
      top: 20px;

      display: flex;
      flex-flow: row wrap;
      justify-content: space-between;
      align-content: space-between;
      & > div {
        width: 4px;
        height: 4px;
        background-color: #000;
        transform: rotate(45deg);
      }
    }
  }
  // 记分牌
  #score-panel {
    width: 304px;
    display: flex;
    justify-content: space-between;
  }
}
